import request from '@/utils/request'

// 查询制度制定列表
export function listOaSystemMake(query) {
  return request({
    url: '/systemMake/oaSystemMake/list',
    method: 'get',
    params: query
  })
}

// 查询制度制定详细
export function getOaSystemMake(id) {
  return request({
    url: '/systemMake/oaSystemMake/' + id,
    method: 'get'
  })
}

// 查询制度制定详细
export function getOaSystemMake3(id) {
  return request({
    url: '/systemMake/oaSystemMake/getById3/' + id,
    method: 'get'
  })
}

// 比对, 获取新旧数据
export function getNewAndOldData(id) {
  return request({
    url: '/systemMake/oaSystemMake/getNewAndOldData/' + id,
    method: 'get'
  })
}

// 保存制度制定
export function saveOaSystemMake(data) {
  return request({
    url: '/systemMake/oaSystemMake/save',
    method: 'post',
    data: data
  })
}

// 变更
export function change(data) {
  return request({
    url: '/systemMake/oaSystemMake/change',
    method: 'post',
    data: data
  })
}

// 终止变更
export function terminateChanges(dataId) {
  return request({
    url: '/systemMake/oaSystemMake/terminateChanges/' + dataId,
    method: 'get'
  })
}

// 删除制度制定
export function delOaSystemMake(id) {
  return request({
    url: '/systemMake/oaSystemMake/' + id,
    method: 'delete'
  })
}

// 导出制度制定
export function exportOaSystemMake(query) {
  return request({
    url: '/systemMake/oaSystemMake/export',
    method: 'get',
    params: query
  })
}
